package com.pangu.export.entity;

import com.pangu.export.annotation.ExcelCell;
import lombok.Data;

/**
 * 表字段及属性
 * PRI 主键约束
 * UNI 唯一约束
 * MUL 可以重复
 * <p>
 * Created by etfox on 2019/10/24 15:50
 */
@Data
public class TableColumn {

    private String tableSchema;

    @ExcelCell(title = true, cellX = -1)
    private String tableName;// 表名

    @ExcelCell(title = true, cellX = -2)
    private String tableComment;// 表注释

    @ExcelCell(cellX = 0)
    private String columnName;// 列名

    @ExcelCell(cellX = 1)
    private String columnType;// 数据类型

    @ExcelCell(cellX = 2)
    private String characterMaximumLength;// 字符长度, char/varchar

//    private String numericPrecision;// 数值精度, decimal

//    private String numericScale;// 数值刻度, decimal

    @ExcelCell(cellX = 3)
    private String decimalPlaces;// 小数位

    @ExcelCell(cellX = 4)
    private String logo;// 标识

    @ExcelCell(cellX = 5)
    private String primaryKey;// 主键

    @ExcelCell(cellX = 6)
    private String foreignKey;// 外键

    @ExcelCell(cellX = 7)
    private String isNullable;// 是否为空

    @ExcelCell(cellX = 8)
    private String columnDefault;// 默认值

    @ExcelCell(cellX = 9)
    private String columnComment;// 说明

}
